﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Maticsoft.DBUtility;

namespace ElingOA6_Admin_DSJCJ.DAL
{
    /// <summary>
    /// 用户组DAL
    /// </summary>
    public  class PrvUserGroup
    {
        /// <summary>
        /// 获得用户组ID
        /// <creator>zhongyl</creator>
        /// <date>2013-07-12</date>
        /// </summary>
        /// <param name="strWhere">SQL查询语句</param>
        /// <returns>用户组ID列表</returns>
        public List<string> GetGroupNoList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select FGroupNo ");
            strSql.Append(" FROM t_PrvUserGroup ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            List<string> groupNoList = new List<string>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                groupNoList.Add(ds.Tables[0].Rows[i]["FGroupNo"].ToString());
            }

            return groupNoList;
        }
    }
}
